<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>{:getenv('APP_NAME')}后台系统</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="__IMG__favicon.ico">
    {load href="__CSS__bootstrap.min.css"}
    {load href="__CSS__font-awesome.min.css"}
    {load href="__CSS__animate.min.css"}
    {load href="__CSS__style.min.css"}
</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header" style="text-align: center;">
                    <span><img alt="image" class="img-circle" src="__IMG__avatar.jpg" /></span>
                    <div class="dropdown profile-element">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="block m-t-xs" style="margin:20px 0px 0px 0px"><h3><strong class="font-bold">{$admin.name}</strong></h3></span>
                        </a>

                    </div>
                    <div class="logo-element"><i class="fa fa-home"></i>
                    </div>
                </li>

                {php}
                $isDev = getenv('APP_DEBUG');
                $data=db('category')->where(['tid' => 0, 'hideleft' => 1, 'id'=>['in', $adminTypeData]])->order('des desc,id asc')->cache('admincate1'.$admin['id'],60, 'admincategory')->select();
                foreach($data as $k=>$v){
                {/php}
                <li class="nav-item">
                    {php}
                    $url='';
                    if($v['controller'] && $v['function']){
                    $url='class="J_menuItem" href="'.url($v['controller'].'/'.$v['function']).'"';
                    }else{
                    $url='href="#"';
                    }
                    {/php}
                    <a {$url}>
                        <i class="fa fa-{$v.icon}"></i>
                        <span class="nav-label">{$v.title}</span>
                        {php}
                        $data2=db('category')->where(['tid'=>$v['id'],'hideleft'=>1, 'id'=>['in', $adminTypeData]])->order('des desc,id asc')->cache('admincate2'.$admin['id'] .':' . $v['id'],60, 'admincategory')->select();
                        if($data2){echo '<span class="fa arrow"></span>';}
                        {/php}
                    </a>
                    {php}
                    if($data2){
                    {/php}
                    <ul class="nav nav-second-level">
                        {php}
                        foreach($data2 as $k2=>$v2){
                        {/php}

                        {php}
                        $url='';
                        if($v2['controller'] && $v2['function'] && ($admin['type'] == 1 or in_array($v2['id'], $adminTypeData))){
                        if (!$isDev && !class_exists('\\app\\admin\\controller\\'.ucfirst($v2['controller'])) || !method_exists('\\app\\admin\\controller\\'.ucfirst($v2['controller']), $v2['function'])){
                        continue;
                        }
                        $url='class="J_menuItem" href="'.url($v2['controller'].'/'.$v2['function']).'?'.$v2['get'].'"';
                        }else if(!$v2['controller'] && !$v2['function']){
                        $url='class=""';
                        }else{
                        $url='';
                        }
                        $data3=db('category')->where(['tid'=>$v2['id'],'hideleft'=>1, 'id'=>['in', $adminTypeData]])->order('des asc,id asc')->select();
                        {/php}
                        {if condition = '($url or $admin.type == 1)'}
                        <li><a {$url} id="menu{$v2.id}">{$v2.title}{php}if($data3){echo '<span class="fa arrow"></span>';}{/php}</a>
                            {php}if($data3){{/php}
                            <ul class="nav nav-third-level">
                                {php}
                                foreach($data3 as $k3=>$v3){
                                if (!$isDev && !method_exists('\\app\\admin\\controller\\'.ucfirst($v3['controller']), $v3['function'])){
                                continue;
                                }
                                {/php}
                                <li>
                                    <a class="J_menuItem" id="menu{$v3.id}"  href="{:url($v3['controller'].'/'.$v3['function'])}">{$v3.title}{$v3.get}</a>
                                </li>
                                {php}}{/php}
                            </ul>
                            {php}}{/php}
                        </li>
                        {/if}
                        {php}}{/php}
                    </ul>
                    {php}}{/php}
                </li>
                {php}}{/php}

            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                    <!--   <form role="search" class="navbar-form-custom" method="post" action="http://www.zi-han.net/theme/hplus/search_results.html">
                          <div class="form-group">
                              <input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">
                          </div>
                      </form> -->
                </div>
            </nav>
        </div>
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active J_menuTab" data-id="{:url('main')}">首页</a>
                </div>
            </nav>

            <a href="{:url('index/out')}" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url('main6')}" frameborder="0" data-id="{:url('main')}" seamless></iframe>
        </div>
        {if condition="$icp"}
        <div class="footer">
            <div class="pull-right">
                <!-- Copyright &copy; 2013-2018 <a href="http://www.xxx.cn/" target="_blank">XXX网络</a> 版权所有 <a href="http://www.xxx.cn/" target="_blank">技术支持</a> -->
                {$icp}
            </div>
        </div>
        {else/}
        <style>
            #content-main {
                height: calc(100% - 100px);
            }
        </style>
        {/if}
    </div>
    <!--右侧部分结束-->
    <!--<div id="small-chat">
        <span class="badge badge-warning pull-right">5</span>
        <a class="open-small-chat">
            <i class="fa fa-comments"></i>
        </a>
    </div>-->
</div>
{load href="__JS__jquery.min.js"}
{load href="__JS__bootstrap.min.js"}
{load href="__PLUGINS__metisMenu/jquery.metisMenu.js"}
{load href="__PLUGINS__slimscroll/jquery.slimscroll.min.js"}
{load href="__PLUGINS__layer/layer.js"}
{load href="__JS__hplus.min.js"}
{load href="__JS__contabs.min.js"}
{load href="__PLUGINS__pace/pace.min.js"}
{load href="__PLUGINS__sweetalert/sweetalert.css"}
{load href="__PLUGINS__sweetalert/sweetalert.min.js"}
{load href="__PLUGINS__toastr/toastr.min.css"}
{load href="__PLUGINS__toastr/toastr.min.js"}

</body>
</html>
